package com.yida.system.api;

import org.springframework.cloud.openfeign.FeignAutoConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

import com.yida.common.core.constant.SecurityConstants;
import com.yida.common.core.constant.ServiceNameConstants;
import com.yida.common.core.domain.R;
import com.yida.system.api.domain.SysArea;
import com.yida.system.api.factory.RemoteAreaFallbackFactory;

/**
 * 
 * 地区服务
 * 
 * @author Administrator
 * @date 2023/06/14
 */
@FeignClient(contextId = "remoteAreaService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteAreaFallbackFactory.class, configuration = FeignAutoConfiguration.class)
public interface RemoteAreaService {

    @GetMapping("/area/vote/area/{areaId}")
    public R<SysArea> getVoteAreaInfo(@RequestParam("areaId") Long areaId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
